package com.cool.collect.demo;

import cn.hutool.core.lang.hash.Hash;
import com.googlecode.aviator.AviatorEvaluator;

import java.util.HashMap;

/**
 * @Author: xiemiao
 * @CreateTime: 2023-03-14  14:06
 * @Description: TODO
 * @Version: 1.0
 */
public class AviatorDemo {
    public static void main(String[] args) {
        String exp = "identity('sCode not in 1 or sName != 2')";
        String exp2 = null;
        HashMap<String, Object> map = new HashMap<>();
        map.put("sId", "1");
        String s = AviatorEvaluator.compile(exp).execute(map).toString();
        System.out.println(s);
    }
}
